#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

LDFLAGS += -lCoinUtils -lOsi
DEB_CONFIGURE_EXTRA_FLAGS += --enable-static CPPFLAGS=-I/usr/include/coin

binary-install/coinor-coinor-libflopc++0:: debian/stamp-binary-install-coinor-coinor-libflopc++0
debian/stamp-binary-install-coinor-coinor-libflopc++0:
	sed -i "s/^dependency_libs.*/dependency_libs=' '/" debian/tmp/usr/lib/libFlopCpp.la
	touch $@

build/coinor-libflopc++-doc:: debian/stamp-build-coinor-libflopc++-doc
debian/stamp-build-coinor-libflopc++-doc:
	doxygen doxydoc/doxygen.conf
	$(RM) doxydoc/html/*.md5 doxydoc/html/*.dot doxydoc/html/*.map
	touch $@

install/coinor-libflopc++-doc:: debian/stamp-install-coinor-libflopc++-doc
debian/stamp-install-coinor-libflopc++-doc:
	mkdir -p $(CURDIR)/debian/coinor-libflopc++-doc/usr/share/doc/coinor-libflopc++-doc/
	cp -r doxydoc/html $(CURDIR)/debian/coinor-libflopc++-doc/usr/share/doc/coinor-libflopc++-doc/
	touch $@

patch: apply-patches

get-orig-source:
	-uscan --rename --upstream-version 0
	@echo successfully retrieved upstream tarball

clean::
	$(RM) -r debian/stamp-* doxydoc/html
